Add Windows (clang-cl) support for continuous fuzzing#1994
Add Windows (clang-cl) support for continuous fuzzing#1994copybara-service[bot] merged 3 commits intogoogle:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
976dcec to
b983b49
Compare
|
@fniksic How can we merge this? I noticed you are red for the CLA. |
The CLA check fails because after you incorporated my suggested fix, GitHub added me as a co-author using my private email instead of my Google email. Since I'm a Google employee, I can't really sign the CLA in the same way, so I can't fix it that way. Can you remove me as a co-author? See these instructions: https://github.com/orgs/community/discussions/76660#discussioncomment-7649637 |
cb17c86 to
fb1f458
Compare
|
@fniksic Thank you. Ready for merge. :) |
I recently added Windows support for Google FuzzTest here google/fuzztest#1994 and I was internally (Edge) pinning CIPD to that hash and had this patch locally for experimentation in place. I was made aware that you guys rolled FuzzTest deps which includes that above PR. Please consider to merge this. Change-Id: I6d031f241af572ca9713bd7c2f943159e05401a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7749717 Reviewed-by: Ben Pastene <bpastene@chromium.org> Commit-Queue: Giovanni Ortuno Urquidi <ortuno@chromium.org> Reviewed-by: Titouan Rigoudy <titouan@chromium.org> Cr-Commit-Position: refs/heads/main@{#1617861}
Summary
Enable continuous fuzzing (
--fuzz=) on Windows with clang-cl.Problem
FuzzTest's continuous fuzzing mode fails on Windows with:
Despite clang-cl correctly applying
-fsanitize-coverage=inline-8bit-countersand the__sanitizer_cov_8bit_counters_initcallback firing, the coverage data is never used becauseFUZZTEST_COVERAGE_IS_AVAILABLEexcludes_WIN32.CorpusCoverage::Update()compiles as a stub returningfalseon Windows, so the fuzzer never considers any input as providing new coverage.Changes
Add
defined(_WIN32)to theFUZZTEST_COVERAGE_IS_AVAILABLEguard - clang-cl supports the same sanitizer coverage instrumentation as clang on Linux/macOS.Use
_aligned_malloc/_aligned_freeon Windows — the MSVC CRT does not providestd::aligned_alloc. Memory allocated with_aligned_mallocmust be freed with_aligned_free(notstd::free).